package com.micro.school.system.api;


import com.micro.school.common.core.constant.ServiceNameConstants;
import com.micro.school.common.core.domain.R;
import com.micro.school.system.api.domain.vo.*;
import com.micro.school.system.api.factory.RemoteEduFallbackFactory;
import com.micro.school.system.api.factory.RemoteUserFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;


/**
 * 用户服务
 *
 * @author upupgo
 */
@FeignClient(contextId = "remoteEduService", value = ServiceNameConstants.EDU_SERVICE, fallbackFactory = RemoteEduFallbackFactory.class)
public interface RemoteEduService
{
    /**
     * 校验学院
     *
     * @param fileUrl 文件地址
     * @return 结果
     */
    @PostMapping(value = "/college/getSchoolCollegeLists1")
    public R<List<SchoolCollegeVos>> checkCollege(@RequestBody SchoolCollegeVos schoolCollegeVos);


    /**
     * 校验学院
     *
     * @param fileUrl 文件地址
     * @return 结果
     */
    @PostMapping(value = "/college/getAllCollegeNameList")
    public R<String> getAllCollegeNameList(@RequestBody SchoolCollegeVos schoolCollegeVos);

    /**
     * 校验模式
     *
     * @param fileUrl 文件地址
     * @return 结果
     */
    @PostMapping(value = "/model/getCollegeModeLists1")
    public R<List<CollegeModelVos>> checkEducation(@RequestBody CollegeModelVos collegeModelVos);

    /**
     * 校验年级
     *
     * @param fileUrl 文件地址
     * @return 结果
     */
    @PostMapping(value = "/grade/getSchoolGradeLists")
    public R<List<SchoolGradeVos>> checkGrade(@RequestBody SchoolGradeVos schoolGradeVos);


    /**
     * 校验专业
     *
     * @param fileUrl 文件地址
     * @return 结果
     */
    @PostMapping(value = "/major/getCollegeMajorLists1")
    public R<List<CollegeMajorVos>> checkMajor(@RequestBody CollegeMajorVos collegeMajorVos);


    /**
     * 校验校区
     *
     * @param fileUrl 文件地址
     * @return 结果
     */
    @PostMapping(value = "/campus/getCampusLists1")
    public R<List<SchoolCampusVos>> checkCampus(@RequestBody SchoolCampusVos schoolCampusVos);


    /**
     * 校验收费学年
     *
     * @param fileUrl 文件地址
     * @return 结果
     */
    @PostMapping(value = "/year/getSchoolFeeYearLists")
    public R<List<SchoolFeeYearVos>> checkFeeYear(@RequestBody SchoolFeeYearVos schoolFeeYearVos);


    /**
     * 查询学院专业
     */
    @GetMapping(value = "/major/feign/{id}")
    public R<CollegeMajorVos> getMajorById(@PathVariable("id") Long id);

    /**
     * 查询学院模式
     */
    @GetMapping(value = "/model/feign/{id}")
    public R<CollegeModelVos> getModelById(@PathVariable("id") Long id);

    /**
     * 校区信息
     */
    @GetMapping(value = "/campus/feign/{id}")
    public R<SchoolCampusVos> getCampusById(@PathVariable("id") Long id);

    /**
     * 查询学院信息
     */
    @GetMapping(value = "/college/feign/{id}")
    public R<SchoolCollegeVos> getCollegeById(@PathVariable("id") Long id);

    /**
     * 查询学校收费学年
     */
    @GetMapping(value = "/year/feign/{id}")
    public R<SchoolFeeYearVos> getYearById(@PathVariable("id") Long id);

    /**
     * 查询学校年级
     */
    @GetMapping(value = "/grade/feign/{id}")
    public R<SchoolGradeVos> getGradeById(@PathVariable("id") Long id);

    /**
     * 查询所有校区信息
     */
    @PostMapping(value = "/campus/getAllCampusIdVos")
    R<String> getAllCampusIdVos(@RequestBody SchoolCampusVos schoolCampusVos);
}
